package com.hongfeng.web.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.hongfeng.web.model.common.BaseEntity;

/**
 * 
 * <订单信息>
 *
 * @author llc
 * @date 创建时间：2012-12-5 下午04:32:12
 */
@Entity
@Table(name = "order_info")
public class OrderInfo extends BaseEntity {

	private static final long serialVersionUID = -3081633761902272782L;
	@Id
	@GeneratedValue
	private Long id;
	// 订单号
	@Column(name = "order_no", length = 100, nullable = false)
	private String orderNo;
	// 订单人姓名
	@Column(name = "order_name", length = 50, nullable = false)
	private String orderName;
	// 订单人联系电话
	@Column(name = "order_phone", length = 20)
	private String orderPhone;
	// 订单价格
	@Column(name = "order_price", nullable = false)
	private Double orderPrice;
	// 订单地址
	@Column(name = "order_address", length = 200, nullable = false)
	private String orderAddress;
	// 备注
	@Column(name = "memo", length = 200)
	private String memo;
	// 排序值
	@Column(name = "pos")
	private Integer pos;
	// 订单状态
	@ManyToOne
	@JoinColumn(name = "order_state_id")
	private OrderState orderState;
	// 产品
	@ManyToOne
	@JoinColumn(name = "product_id")
	private Product product;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getOrderNo() {
		return orderNo;
	}

	public void setOrderNo(String orderNo) {
		this.orderNo = orderNo;
	}

	public String getOrderName() {
		return orderName;
	}

	public void setOrderName(String orderName) {
		this.orderName = orderName;
	}

	public String getOrderPhone() {
		return orderPhone;
	}

	public void setOrderPhone(String orderPhone) {
		this.orderPhone = orderPhone;
	}

	public Double getOrderPrice() {
		return orderPrice;
	}

	public void setOrderPrice(Double orderPrice) {
		this.orderPrice = orderPrice;
	}

	public String getOrderAddress() {
		return orderAddress;
	}

	public void setOrderAddress(String orderAddress) {
		this.orderAddress = orderAddress;
	}

	public OrderState getOrderState() {
		return orderState;
	}

	public void setOrderState(OrderState orderState) {
		this.orderState = orderState;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public Product getProduct() {
		return product;
	}

	public void setProduct(Product product) {
		this.product = product;
	}

	public Integer getPos() {
		return pos;
	}

	public void setPos(Integer pos) {
		this.pos = pos;
	}

}
